package com.ht.system.config;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import com.ht.system.component.InitDictCommonComponent;

/**
 * spring容器启动完成之后运行
 * @Title: ApplicationRunnerImpl.java
 * @author zmx
 * @date 2024年11月13日
 * @version V1.0
 */
@Component
public class ApplicationRunnerImpl implements ApplicationRunner{
	protected final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private InitDictCommonComponent initDictCommonComponent;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        logger.info("系统启动完成之后初始数据");
        try {
        	initDictCommonComponent.initDict();
        } catch (Exception e) {
            logger.error("初始化字典失败:{}", e.getMessage());
        }
    }
    
  

   





}
